package com.julian.delegatePattern.rmi;

import java.rmi.Naming;

public class MyRemoteClient {

    public static void main(String[] args) {
        new MyRemoteClient().go();
    }

    public void go(){
        try {
            // lookup method to find reference of remote object
            MyRemote service = (MyRemote) Naming.lookup( "rmi://localhost:1901/RemoteHello");
            System.out.println(service.sayHello());

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
